Skip to content

feat: savings goals & milestones tracking#403

Open
TallowX92 wants to merge 1 commit intorohitdash08:mainfrom
TallowX92:feat/savings-goals-only
Open

feat: savings goals & milestones tracking#403
TallowX92 wants to merge 1 commit intorohitdash08:mainfrom
TallowX92:feat/savings-goals-only

Conversation

@TallowX92
Copy link

@TallowX92 TallowX92 commented Mar 14, 2026

/claim #133

Demo

Demo-2026-03-14.mp4

Goal creation, deposit tracking, animated progress bar, and 25% milestone badge.


Summary

Full-stack savings goal tracking with deposit history, animated progress bars, and auto-computed milestone badges.

Backend — /savings

Method Endpoint Description
GET /savings List goals with progress % and milestones
POST /savings Create goal
GET /savings/<id> Goal detail
PATCH /savings/<id> Update name / target / currency / status
DELETE /savings/<id> Delete goal
POST /savings/<id>/deposits Add deposit (auto-completes goal at 100%)
GET /savings/<id>/deposits Full deposit history

Milestones computed at 25 / 50 / 75 / 100% of target_amount.

Status enum: ACTIVECOMPLETED (auto on 100%) | PAUSED

New models

  • SavingsGoal — name, target_amount, current_amount, currency, status, deadline
  • SavingsDeposit — goal_id, amount, note, created_at

Frontend

  • api/savings.ts — fully typed API client
  • pages/Savings.tsx — animated progress bars, milestone badges (Trophy icon at 25/50/75/100%), deposit dialog, pause/resume toggle, delete with AlertDialog confirmation
  • /savings route added to App.tsx and Navbar

Tests — tests/test_savings.py (21 tests, all passing)

  • CRUD: create minimal, create with deadline, list empty, list own, get own, get 404, update name, update target, delete
  • Deposits: add deposit updates balance, auto-completes at 100%, deposit history returned
  • Milestones: badge appears at 25/50/75/100%
  • Auth isolation: cannot read/write another user's goals
  • Validation: missing name rejected, missing target rejected, negative deposit rejected

Adds full savings goal management with deposit history and computed
milestone tracking across backend and frontend.

Backend:
- SavingsGoal model: name, target, current_amount, currency, deadline,
  notes, status (ACTIVE/COMPLETED/PAUSED)
- SavingsDeposit model: per-goal contribution history
- /savings CRUD endpoints (GET, POST, PATCH, DELETE)
- POST /savings/:id/deposits — add funds, auto-completes goal at 100%
- GET /savings/:id/deposits — deposit history
- Milestones computed at 25/50/75/100% of target
- Schema SQL + backwards-compatible ALTER statements

Frontend:
- api/savings.ts — typed API client
- pages/Savings.tsx — goal cards, progress bars, milestone badges,
  deposit dialog, pause/resume, delete
- /savings route registered in App.tsx and Navbar
@TallowX92 TallowX92 force-pushed the feat/savings-goals-only branch from ab5e53a to 19f8a24 Compare March 17, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant